package com.behome.web.init;

import com.behome.netty.netty_A.server.StandardAPrivateNettyServer;
import com.behome.netty.netty_A.server.StandardAPublicNettyServer;
import com.behome.netty.netty_B.server.StandardBNettyServer;
import com.behome.netty.netty_D.server.StandardDPrivateNettyServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;


@Component
@Slf4j
public class CommandLineRunnerImpl implements CommandLineRunner {

    @Override
    public void run(String... args) {
        Thread thread = new Thread(() -> StandardAPrivateNettyServer.getMe().start());
//        thread.start();
        Thread thread2 = new Thread(() -> StandardAPublicNettyServer.getMe().start());
        Thread thread3 = new Thread(() -> StandardBNettyServer.getMe().start());
        Thread thread4 = new Thread(() -> StandardDPrivateNettyServer.getMe().start());
//        thread2.start();
        thread3.start();
//        thread4.start();
    }

}
